package com.module.overview.ui.summaryReport

import androidx.recyclerview.widget.RecyclerView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.common.app.data.bean.overView.SummaryReportRecordListModel
import com.common.app.utls.TimeUtils
import com.module.overview.R

/**
 *
 * 作者：sosou
 *
 * 版本：1.0
 *
 * 创建日期：2025/08/06
 *
 * 描述：
 *
 * 修订历史：
 *
 */
class SummaryReportRecordListAdapter : BaseQuickAdapter<SummaryReportRecordListModel, BaseViewHolder>(R.layout.overview_item_summary_report_record_list) {

    override fun convert(holder: BaseViewHolder, item: SummaryReportRecordListModel) {
        holder.setText(R.id.tvTitle, TimeUtils.getYearMonthDay(item.time))
        val mAdapter = SummaryReportRecordAdapter()
        holder.getView<RecyclerView>(R.id.hrv).adapter = mAdapter
        mAdapter.setList(item.mData)
    }

    override fun onItemViewHolderCreated(viewHolder: BaseViewHolder, viewType: Int) {
        super.onItemViewHolderCreated(viewHolder, viewType)
    }

}